package com.cy.pattern.simpleFactory;

/**
 * 简单工厂方法模式测试类
 *
 * Created by yun.chen on 2015/9/28.
 */
public class Test {

    public static void main(String[] args) {
        Food mcChicken = FoodFactory.getFood("mcChicken");
        Food chips = FoodFactory.getFood("chips");
        Food eggs = FoodFactory.getFood("eggs");

        if (mcChicken != null) {
            mcChicken.get();
        }
        if (chips != null) {
            chips.get();
        }
        if (eggs != null) {
            eggs.get();
        }
    }

}
